<!--
    视频配置
-->
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:replace="common/common :: jscss"/><title>标记配置</title>
</head>
<body>
<style>
    .layui-card .layui-form .layui-form-label {
        width: 120px;
    }
    .layui-required:before {
        content: "*\00A0\00A0";
        display: inline-flex;
        color: #ff0000;
    }

</style>
<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-card-body">
            <form method="post" action="" class="layui-form" id="zmn-form" lay-filter="zmn-form">
                <input type="hidden" th:value="${conf.id}" name="id">
                <input type="hidden" name="type" value="2"/>

                <th:block th:if="${conf.id != null}">
                    <label class="layui-form-label">ID：</label>
                    <div class="layui-input-block">
                        <div class="layui-form-mid">
                            <span id="contentId">[[${conf.id}]]</span>
                        </div>
                    </div>
                </th:block>

                <div class="layui-form-item">
                    <label class="layui-form-label layui-required">视频类型：</label>
                    <div id="categId" class="layui-input-inline"></div>
                </div>


                <div class="layui-form-item">
                    <label class="layui-form-label">排序：</label>
                    <div class="layui-input-inline">
                        <input type="number" placeholder="排序" id="sort" name="sort" th:value="${conf.sort}" lay-verify="required" class="layui-input"/>
                    </div>
                    <div class="layui-form-mid layui-word-aux">数字越小，越在前面</div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label layui-required">服务分类：</label>
                    <div  id="servCategIds" class="layui-input-inline"></div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label layui-required">业务类型：</label>
                    <div id="bizType" class="layui-input-inline"></div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">应用渠道：</label>
                    <div id="channelIds" class="layui-input-inline"></div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label layui-required">是否必传：</label>
                    <input type="radio"
                           name="mustUpload"
                           class="mustUpload"
                           value="2"
                           title="是"
                           th:checked="${conf.mustUpload == 2}"
                           lay-verify="otherReq">
                    <input type="radio"
                           th:name="mustUpload"
                           class="mustUpload"
                           value="1"
                           title="否"
                           th:checked="${conf.mustUpload == 1}"
                           lay-verify="otherReq">
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">示例视频：</label>
                    <div class="layui-input-inline" style="width: 200px">
                        <input type="hidden" id="videoValue" name="egSrc" th:value="${conf.egSrc}">
                        <div class="layui-upload-drag" id="egVideoSrc" th:style="${conf.egSrc==null ||conf.egSrc==''?'display:block':'display:none'}">
                            <i class="layui-icon"></i>
                            <p>示例视频，仅用于上传，没有可不上传</p>
                            <span style="font-size: 12px;color: rgb(255,0,0)">(格式支持： mp4或avi，上传视频需<10M)</span>
                        </div>
                        <video th:src="${conf.egSrc}"
                               th:style="${conf.egSrc==null ||conf.egSrc=='' ?'display:none':'display:block;width: 100%; height: 130px'}"
                               id="egVideoShow"
                               controls="controls">
                        </video>
                    </div>
                    <div class="layui-inline" style=" position: absolute; top: 70%">
                        <i class="layui-icon layui-icon-search btn-review"></i><br>
                        <i class="layui-icon layui-icon-delete btn-delete"></i>
                    </div>
                </div>

                    <div class="layui-form-item submit">
                        <div class="layui-input-block">
                            <button class="layui-btn" lay-submit="" lay-filter="zmn-form-submit">保存</button>
                            <button class="layui-btn layui-btn-primary" onclick="parent.layer.closeAll();">取消</button>
                        </div>
                    </div>

            </form>
        </div>
    </div>
</div>

<script th:inline="javascript">
    let dataVo = [[${conf}]];

    layui.config({
        base: "/static/js/module/",
        version: 20221013001,
    }).extend({
        oms_conf_attachment_orderVideo_detail: "conf/attachment/orderVideo/zmn.oms.conf.orderVideo.detail"
    }).use(['oms_conf_attachment_orderVideo_detail']);
</script>

</body>
</html>